local shengbing = fk.CreateSkill{
  name = "hanqing__shengbing",
  tags = { Skill.Compulsory },
}

Fk:loadTranslationTable{
  ["hanqing__shengbing"] = "盛兵",
  [":hanqing__shengbing"] = "锁定技，你对受伤角色或其他受伤角色对你使用基本牌时，若你已受伤，此牌额外结算一次。",
}

shengbing:addEffect(fk.CardUsing, {
  anim_type = "offensive",
  can_trigger = function(self, event, target, player, data)
    if player:hasSkill(shengbing.name) and data.card.type == Card.TypeBasic and data.tos and player:isWounded() then
      if data.from == player then
        return table.find(data.tos, function (p)
          return p:isWounded()
        end)
      else
        return data.from:isWounded() and table.contains(data.tos, player)
      end
    end
  end,
  on_use = function(self, event, target, player, data)
    data.additionalEffect = (data.additionalEffect or 0) + 1
  end,
})

return shengbing
